﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using LfmApi;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;

namespace Test
{
    class Program
    {
        static string apiKey = "b25b959554ed76058ac220b7b2e0a026";

        static void Main(string[] args)
        {
            var factory = new ChannelFactory<IApi>(new WebHttpBinding());
            factory.Endpoint.Address = new EndpointAddress("http://ws.audioscrobbler.com/2.0/");
            factory.Endpoint.Behaviors.Add(new WebHttpBehavior());

            var proxy = factory.CreateChannel();

            //test album_getInfoByArtistAlbum
            //var response = proxy.album_getInfo(apiKey, "cher", "believe");

            //test album_getInfoByMbid
            //var response = proxy.album_getInfo(apiKey, "61bf0388-b8a9-48f4-81d1-7eb02706dfb0");

            //test album_search
            //var response = proxy.album_search(apiKey, "believe");


            ((IDisposable)proxy).Dispose();

        }
    }


}
